package com.punai.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.punai.common.core.domain.entity.SysCompany;
import com.punai.common.core.domain.entity.SysDept;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysCompanyMapper extends BaseMapper<SysCompany> {

    List<SysCompany> selectCompanyList(SysCompany company);

    SysCompany selectCompanyById(Long id);

    List<SysCompany> selectCompanyAndChild(Long id);

    int selectNormalChildrenCompanyById(Long id);

    int hasChildByCompanyId(Long id);

    int checkCompanyExistUser(Long id);

    int deleteCompanyById(Long id);

    List<SysCompany> selectChildrenCompanyById(Long id);

    void updateCompanyChildren(@Param("companys") List<SysCompany> children);

    void updateCompanyStatusNormal(@Param("companyIds")Long[] companyIds);
}
